﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/MasterPage.master" AutoEventWireup="true"
    CodeFile="advertisementDetail.aspx.cs" Inherits="admin_webconfig_advertisementDetail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Head_Title" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Head" runat="Server">
    <link href="../../Plugin/uploadifyV3.1/uploadify.css" rel="stylesheet" type="text/css" />
    <script src="../../Plugin/uploadifyV3.1/jquery.uploadify-3.1.js" type="text/javascript"></script>
    <script src="../../Scripts/sjn.1.js" type="text/javascript"></script>
    <script src="../../Scripts/jQuery.Extensions.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Title" runat="Server">
    网站配置 - 广告管理 - 广告详情
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Control" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="Content" runat="Server">
    <script type="text/javascript" language="javascript">
        $(function () {
            $("#uploadify").uploadify({
                'swf': '/Plugin/uploadifyV3.1/uploadify.swf',
                'uploader': '/Iframe/ajaxServer/FileUpload.ashx',
                'buttonText': '选择图片',
                'auto': true,
                'multi': false,
                onUploadSuccess: function (file, data, response) {
                    if (response) {
                        var tem = "     <div>";
                        tem += "               <img />";
                        tem += "        <div style=\"cursor:pointer; text-align:center\" onclick='delPic()'>";
                        tem += "            删除</div></div>";
                        tem = $(tem);
                        tem.find("img").attr("src", data).width(200);
                        $("#imglist").append(tem);

                        $("#picPath").val(data);  //把图片地址赋给控件

                        var image = new Image();
                        image.src = data;
                        $.sleep(5, function () {
                            $("#ipt_height").val(image.height); //得到高
                            $("#ipt_width").val(image.width);   //得到宽
                        });

                        $("#uploadify").hide();

                    }
                }
            });

        });

        
        var delPic = function () {
            $("#imglist").empty();
            $("#uploadify").show();
        }
    </script>
    <table>
        <tr>
            <td>
                图片上传：
            </td>
            <td>
                <div id="imglist" style="">
                </div>
                <input type="file" name="uploadify" id="uploadify" />
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td>
                连接地址：
            </td>
            <td>
                <input type="text" />
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td>
                宽度：
            </td>
            <td>
                <input id="ipt_width" type="text" />
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td>
                高度：
            </td>
            <td>
                <input id="ipt_height" type="text" />
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td>
                描述：
            </td>
            <td>
                <textarea></textarea>
            </td>
            <td>
                用于方面管理知道本广告在页面的什么位置
            </td>
        </tr>
        <tr>
            <td>
                调用脚本：
            </td>
            <td>
                <textarea></textarea>
            </td>
            <td>
            </td>
        </tr>
    </table>
    <input id="picPath" type="hidden" />
    <input id="Button1" type="button" value="生成脚本并保存" />
    <input id="Button3" type="button" value="取消" />
    <input id="Button2" type="button" value="复制调用脚本" />
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="Foot" runat="Server">
</asp:Content>
